package com.transaction.demo.order.controller;


public class Main {
    public static void main(String[] args) {

        StringBuffer result2 = new StringBuffer(); // 存放最后得到的结果

        for(int i=0;i<100;i++) {
            int num=i;

            StringBuffer result = new StringBuffer(); // 存放最后得到的结果
            while (num > 0) {
                if (num % 3 == 0) {
                    num = num / 3;
                    result.append("A");
                    if(num==1){
                        break;
                    }
                } else if (num % 5 == 0) {
                    num = num / 5;
                    result.append("B");
                    if(num==1){
                        break;
                    }
                } else if (num % 7 == 0) {
                    num = num / 7;
                    result.append("C");
                    if(num==1){
                        break;
                    }
                } else {
                    result.append(num);
                    break;
                }
            }
            result2.append(" "+result.toString());
        }
        System.out.println(result2.toString()); // 输出结果

    }
}